package com.ghca.storm.performance;

import org.apache.storm.task.OutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.topology.OutputFieldsDeclarer;
import org.apache.storm.topology.base.BaseRichBolt;
import org.apache.storm.tuple.Tuple;

import java.util.Map;

/**
 * Created by gh on 2016/10/24.
 */
public class CPUBolt extends BaseRichBolt {
    @Override
    public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) {

    }

    @Override
    public void execute(Tuple input) {
        Long mem = input.getLongByField("mem");
        System.out.println(mem);

    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {

    }
}
